<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<script type="text/javascript" src="<s:url value="/js/investigator.js"/>"></script>

<s:form id="formEdit" cssClass="tableEdit" enctype="multipart/form-data" >
    <tr>
        <th colspan="4" class="tableTitle">
            <h5>Site Staff</h5>
        </th>
    </tr>

    <s:hidden name="id" value="%{involucrado.id}"/>
    <s:textfield label="ECLIPSE Number" name="eclipseId" value="%{involucrado.eclipseId}"/>

    <s:textfield label="Name" name="nombre" value="%{involucrado.nombre}"/>
    <s:textfield label="Surname" name="apellido" value="%{involucrado.apellido}"/>
    <tr>
        <td>
            <label>Physician:</label>
        </td>
        <td>
            <s:checkbox name="isDoctor" id="isDoctor" value="%{involucrado.isDoctor}" theme="simple" onchange="checkIsDoctor()"></s:checkbox>

        </td>
    </tr>
    <s:select label="Degree" name="degree.id" id="degree" value="%{involucrado.degree.id}"
              headerKey="" headerValue="Choose a Degree"
              list="degrees"
              listKey="id"
              listValue="descripcion"
              onchange="isOtherDegree(this.value)"
            >
    </s:select>
    <s:textfield label="Other" name="otherDegree" id="otherDegree" ></s:textfield>
    <s:hidden name="degree.descripcion" id="degreeDescripcion" value="%{involucrado.degree.descripcion}"/>

    <s:select list="sites" listKey="id" id="centro" name="centro.id" value="%{involucrado.centro.id}" listValue="institucion" label="Site" headerKey="-1" headerValue="Choose a Site"/>

    <s:select label="Country" name="compromisopais.id" id="country" value="%{involucrado.compromisopais.id}"
              headerKey="-1" headerValue="Choose Countries"
              list="paisList"
              listKey="id"
              listValue="country"
              onchange="showHideCuit()"
            >
    </s:select>

    <s:textfield label="CUIT/CUIL" name="cuit" id="cuit" value="%{involucrado.cuit}"/>
    <s:textfield label="CNPJ" name="cnpj" id="cnpj" value="%{involucrado.cnpj}"/>
    <s:textfield label="NIT" name="nit" id="nit" value="%{involucrado.nit}"/>
    <s:textfield label="RUT" name="rut" id="rut" value="%{involucrado.rut}"/>

    <tr><div id="div_">If there are multiple e-mail addresses, separate them with a semicolon.
        For example: "johndoe@bms.com;john.doe@gmail.com"</div></tr>
    <tr>
        <td><label>E-mail:</label><img class="imgInfo" src="<s:url value="/images/info.png"/>"/></td>
        <td><s:textfield theme="simple" name="email" value="%{involucrado.email}"/></td>
    </tr>

    <tr><div id="div_2">Country Code + Area Code + Local Number</div></tr>
    <tr>
        <td><label>Phone:   </label><img class="imgInfo2" src="<s:url value="/images/info.png"/>"/></td>
        <td><s:textfield theme="simple" name="phone" value="%{involucrado.phone}" /></td>
    </tr>

    <tr>
        <td><label>Mobile Phone:   </label><img class="imgInfo2" src="<s:url value="/images/info.png"/>"/></td>
        <td><s:textfield theme="simple" name="mobilePhone" value="%{involucrado.mobilePhone}" /></td>
    </tr>

    <s:textfield label="Fax" id="fax" name="fax" value="%{involucrado.fax}"/>
    <s:textfield label="Nextel Number" id="nextelNumber" name="nextelNumber" value="%{involucrado.nextelNumber}"/>
    <s:doubleselect
            id="areas"
            label="Therapeutic Area"
            cssClass="areass"
            list="languageMap.keySet()"
            listKey="id"
            listValue="name"
            name="therapeuticArea.id"
            value="%{involucrado.therapeuticArea.id}"
            doubleId="specialities"
            doubleHeaderKey="-1" doubleHeaderValue="Choose Specialty"
            doubleListKey="id"
            doubleListValue="name"
            doubleName="speciality.id"
            doubleValue="%{involucrado.speciality.id}"
            doubleList="languageMap.get(top)"/>

    <s:file label="CV Spanish" name="data" id="data"  cssClass="fileClass"  ></s:file>
    <s:if test="%{involucrado.filename != null}" >
        <tr>
            <td>
                <s:property value="%{involucrado.filename}"  />
            </td>
            <td>
                <s:submit value="Download" id="download" action="downloadFile" theme="simple" />
            </td>
        </tr>

    </s:if>
    <s:file label="CV English" name="dataEnglish" id="dataEnglish"  cssClass="fileClass"  ></s:file>
    <s:if test="%{involucrado.filenameEnglish != null}" >
        <tr>
            <td>
                <s:property value="%{involucrado.filenameEnglish}"  />
            </td>
            <td>
                <s:submit value="Download" id="downloadEnglish" action="downloadFileEnglish" theme="simple" />
            </td>
        </tr>

    </s:if>

    <tr>
        <td colspan="2" class="centeredButtons" ><s:submit value="Save" id="save" action="save" onclick="beforeSaveInvestigator();validateInvestigator()" theme="simple"/>
        </td>
    </tr>

</s:form>

<script type="text/javascript">
    $('#allSiteStaff').css({"color":"#EE5102","fontWeight":"bold"});
</script>